home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2482 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.1 KB

  1. Path: comsearch.com!tnasca
  2. From: Thuan Nguyen <thnguyen@comsearch.com>
  3. Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.perl
  4. Subject: Re: Stupid array problems
  5. Date: 17 Jan 1996 23:02:42 GMT
  6. Organization: ComSearch, Inc
  7. Message-ID: <4djv6i$ejc@gateway.comsearch.com>
  8. References: <4d9b9v$14n@paperboy.ids.net> <4dbfd1$2hpc@news.gate.net> <4dc5fv$qdr@newsreader.wustl.edu>
  9. NNTP-Posting-Host: arcturus.comsearch.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.4 sun4c)
  14. X-URL: news:4dc5fv$qdr@newsreader.wustl.edu
  15.  
  16. kln@howdy.wustl.edu (Krishnamoorthy Lakshminarayan) wrote:
  17. >    Hello:
  18. >
  19. >    Try this:
  20. >
  21. >    void delete_array_element (char **array,  //The array of strings
  22. >                                   int  max,      // total strings in array
  23. >                                   int  num_del)  //index you want deleted
  24. >      {
  25. >      for (int i=max-1; i>num_del; i++) //max-1, because you've deleted
  26.                                   ^^^^^                                  
  27.                 Isnt suppose to be i--                                    
  28. >        {
  29. >        array[i] = array[i-1];
  30. >        }
  31. >
  32. >      }
  33. >
  34. >    -Lakshmi N.
  35.  
  36.